<template>
  <a-layout class="home-container">
    <div class="background-image"></div>
    <a-layout-content class="content-wrapper">
      <h1 class="title">Welcome to  <span class="highlight">Simply Rugby</span> Club</h1>
      <p class="description">A paradise for rugby enthusiasts! Join us and experience the collision of passion and power!</p>
      <div class="actions">
        <a-button type="primary" size="large" @click="handleStart">Get Started</a-button>
        <a-button size="large" @click="handleLearnMore">Learn More</a-button>
      </div>
      
      
      <div class="social-links">
        <p class="contact-text">Contact with us</p>
        <a href="https://facebook.com" target="_blank" class="social-link">
          <img src="../static/facebook.png" alt="Facebook" />
        </a>
        <a href="https://twitter.com" target="_blank" class="social-link">
          <img src="../static/twitter.png" alt="Twitter" />
        </a>
        <a href="https://instagram.com" target="_blank" class="social-link">
          <img src="../static/instagram.png" alt="Instagram" />
        </a>
      </div>
    </a-layout-content>
  </a-layout>
</template>

<script setup lang="ts">
import { message } from 'ant-design-vue';
import { useRouter } from 'vue-router';
const router = useRouter();
const handleStart = () => {
  message.success('Welcome to get started!');
  router.push({ name: 'Auth' });
};

const handleLearnMore = () => {
  // message.info('Learn more about our club!');
};

</script>

<style scoped>
.home-container {
  height: calc(100vh - 104px - 48px); /* 减去固定导航栏和面包屑高度 */
  background-color: #f5f5f5;
  padding: 24px; /* 统一使用24px边距 */
  box-sizing: border-box;
  background: url('../static/home.jpg') no-repeat center center/cover;
  position: relative;
}

.title {
  color: #808080; /* 更醒目的颜色 */
  font-size: 50px; /* 增加字体大小 */
  font-weight: bold; /* 确保字体加粗 */
  margin-bottom: 20px;
  animation: fadeIn 1.5s ease-in-out;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* 添加文本阴影效果 */
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.highlight {
  color: black; /* 改为灰色 */
  font-size: 1.2em; /* 增加字体大小 */
  font-weight: bold; /* 确保字体加粗 */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* 添加文本阴影效果 */
}


.content-wrapper {
  height: 100%; /* 继承父容器高度 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px; /* 移除固定padding值 */
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: slideUp 1s ease-in-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.title {
  color: #333;
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  animation: fadeIn 1.5s ease-in-out;
}

.description {
  color: #666;
  font-size: 24px;
  line-height: 1.5;
  margin-bottom: 30px;
  animation: fadeIn 2s ease-in-out;
}

.actions {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.social-links {
  position: fixed; /* 固定定位 */
  bottom: 20px; /* 距离底部20px */
  left: 50%; /* 水平居中 */
  transform: translateX(-50%); /* 水平居中调整 */
  display: flex;
  gap: 15px;
}

.contact-text {
  color: #333; /* 与标题颜色一致 */
  font-size: 15px; /* 适当字体大小 */
  font-weight: bold; /* 加粗 */
  margin-bottom: 10px; /* 适当间距 */
}
.social-link img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
}

.social-link img:hover {
  transform: scale(1.2);
}
</style>